<?php
$dom = new DOMDocument;
						$dom->loadXML('<wifiap><res>success</res><token>jdiejskejdkwpokslrmnqwiosdpzei</token></wifiap>');
						if (!$dom) {
						    echo 'Error while parsing the document';
						    exit;
						}
						$s = simplexml_import_dom($dom);
						if($s->res=='success'){
							echo "aaa"; 
						}
						?>